import { defineStore } from "pinia";
import { shallowRef } from "vue";
import config from "@/utils/config.ts";

export const useThemeStore = defineStore("theme", () => {
  const menuTheme = shallowRef(config.menuTheme);
  const colorTheme = shallowRef(config.colorTheme);

  const changeMenuTheme = (color: string) => {
    menuTheme.value = color;
  };

  const changeColorTheme = (color: string) => {
    colorTheme.value = color;
  };

  return {
    menuTheme,
    colorTheme,
    changeMenuTheme,
    changeColorTheme,
  };
});
